const fs = require('fs')
const api = require('zhihu-api')()

// cookie must be set before any request
api._request.request({
    url: 'https://www.zhihu.com/question/36132174'
})
api.cookie(fs.readFileSync('./cookie'))

api.user('zhihuadmin')
    .profile()
    .then(console.log)
    .catch(console.trace)